package com.fs.chatx.module.chat.entity;

import com.fs.chatx.core.vo.PageRequest;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.Settings;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.IdType;

import java.time.LocalDateTime;

@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Settings(shardsNum = 3, replicasNum = 2)
@IndexName(value = "chat_message",keepGlobalPrefix = true)
public class ChatMessage extends PageRequest
{

    @IndexId(type= IdType.CUSTOMIZE)
    private String messageId;
    private String agentId;
    private String model;
    private String sessionId;
    private Integer messageType;
    private String role;
    private String thinking;
    private String content;
    private String status;
    @IndexField(fieldType = FieldType.DATE, dateFormat = "epoch_millis")
    private LocalDateTime createTime;
    //如果是对象，请配置其字段类型为nested
    private String jsonData;


}
